Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): update submodule with token #198

Merged
merged 1 commit into from
Mar 1, 2022
Merged

Conversation

eunjae-lee
Copy link
Contributor

🧭 What and Why

Changes included:

On GitHub Action, submodules are not cloned correctly (https:/algolia/api-clients-automation/runs/5373798260?check_suite_focus=true). This change seems promising.

@eunjae-lee eunjae-lee requested review from a team, damcou and millotp and removed request for a team March 1, 2022 14:05
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to directly add the submodules with https instead of converting in the CI ?

Copy link
Contributor

@damcou damcou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let's test it, keep us updated about the results ;)

@@ -22,7 +22,12 @@ jobs:

- run: git checkout chore/release
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line will be removed later by a PR from chore/release to main. But we need it for now, because the submodule is configured in chore/release branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks for the explanation :)

@@ -22,7 +22,12 @@ jobs:

- run: git checkout chore/release

- run: git submodule update --init --recursive
- run: |
git config --file .gitmodules --get-regexp url | while read url; do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And actions/checkout@v2 has an issue with cloning submodules correctly, so this workaround seems to be needed.

I had only git submodule update --init --recursive, but it failed because of lack of "permission". I suspect, the given github token by GitHub Action cannot touch other repositories than this. So this part applies the personal access token to the origin configuration, which gives more permission to touch other repositories.

@eunjae-lee eunjae-lee merged commit 2408451 into main Mar 1, 2022
@eunjae-lee eunjae-lee deleted the chore/update-submodule branch March 1, 2022 14:51
@eunjae-lee
Copy link
Contributor Author

Is it possible to directly add the submodules with https instead of converting in the CI ?

@millotp I missed your comment. We can do that, but you will have to configure your local environment to work with git via http protocol as well, which is annoying.

@millotp
Copy link
Collaborator

millotp commented Mar 1, 2022

Ah true let's keep it that way then, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants